package org.mespilus.mespilusweb.datalayer.ordermanagement;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import org.mespilus.mespilusweb.datalayer.productmanagement.CoopProduct;
import org.mespilus.mespilusweb.datalayer.usermanagement.Member;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Order {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected int idOrder;
	
	@Persistent
	protected Member member;
	
	@Persistent
	protected CoopProduct product;

	public Order(Member member, CoopProduct product) {
		super();
		this.member = member;
		this.product = product;
	}

	public int getIdOrder() {
		return idOrder;
	}

	public void setIdOrder(int idOrder) {
		this.idOrder = idOrder;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public CoopProduct getProduct() {
		return product;
	}

	public void setProduct(CoopProduct product) {
		this.product = product;
	}
	
	
	
}
